/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Controller;

import Database.DBApartmentBooking;
import Database.IFDBApartmentBooking;
import Domain.ApartmentBooking;
import java.util.ArrayList;

/**
 *
 * @author Min0
 */
public class CTRLApartmentBooking
{
    private IFDBApartmentBooking ApartmentBooking;
    
    public CTRLApartmentBooking()
    {
        ApartmentBooking = new DBApartmentBooking();
    }
    public void insertApartmentBooking(ApartmentBooking apBooking)
    {
        ApartmentBooking.insertApartmentBooking(apBooking);
    }
    
    public void insertApartmentBooking(String BookingID, String CustomerID, String TravelAgency, String CheckInDate, int NoOfNights, int ApartmentNo)
    {
        ApartmentBooking.insertApartmentBooking(BookingID, CustomerID, TravelAgency, CheckInDate, NoOfNights, ApartmentNo);
    }
    
    public void insertApartmentBooking(String BookingID, String CustomerID, String CheckInDate, int NoOfNights, int ApartmentNo)
    {
        ApartmentBooking.insertApartmentBooking(BookingID, CustomerID, CheckInDate, NoOfNights, ApartmentNo);
    }
    
    public ApartmentBooking getApartmentBooking(String BookingID)
    {
        return ApartmentBooking.getApartmentBooking(BookingID);
    }
    
    public ArrayList<ApartmentBooking> getApartmentBookingList()
    {
        return ApartmentBooking.getApartmentBookingList();
    }
    
    public void updateApartmentBooking(String BookingID, String CustomerID, String TravelAgency, String CheckInDate, int NoOfNights, int ApartmentNo)
    {
        ApartmentBooking.updateApartmentBooking(BookingID, CustomerID, TravelAgency, CheckInDate, NoOfNights, ApartmentNo);
    }
    
    public void deleteApartmentBooking(String BookingID)
    {
        ApartmentBooking.deleteApartmentBooking(BookingID);
    }
        
    public int getMax()
    {
        return ApartmentBooking.getMax();
    }
    
}
